'use strict';

/**
 * 班级schema
 */
const mongoose = require('mongoose'), Schema = mongoose.Schema;

const classgradeSchema = new Schema({
    name: { type:String, required:true }, //班级名称
    num: { type:String },//班级编号
    /* 
        班级学生
        @param:related_students
        @demo: [{student_id:1,student_name:'abc',student_num:'123'}]
    */
   related_students:{ type: Schema.Types.Mixed },//班级学生
})

module.exports = mongoose.model('ClassgradeModel', classgradeSchema, 'classgrade')